import Vue from "vue";
import VueRouter from "vue-router";
import Index from "../views/Index.vue";
// import FirstPage from "../views/FirstPage.vue";
Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    name: "Index",
    component: Index,
    redirect: "/firstPage",
    children: [
      {
        path: "/firstPage",
        name: "FirstPage",
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () =>
          import(/* webpackChunkName: "about" */ "../views/FirstPage.vue"),
      },
      {
        path: "/allproduct",
        name: "Allproduct",
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () =>
          import(/* webpackChunkName: "about" */ "../views/Allproduct.vue"),
      },
      {
        path: "/brandStory",
        name: "BrandStory",
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () =>
          import(/* webpackChunkName: "about" */ "../views/BrandStory.vue"),
      },
      {
        path: "/brandHonor",
        name: "BrandHonor",
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () =>
          import(/* webpackChunkName: "about" */ "../views/BrandHonor.vue"),
      },
      {
        path: "/whiteTea",
        name: "WhiteTea",
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () =>
          import(/* webpackChunkName: "about" */ "../views/WhiteTea.vue"),
      },
      {
        path: "/giftBox",
        name: "GiftBox",
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () =>
          import(/* webpackChunkName: "about" */ "../views/GiftBox.vue"),
      },
      {
        path: "/zsjm",
        name: "Zsjm",
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () =>
          import(/* webpackChunkName: "about" */ "../views/Zsjm.vue"),
      },
      {
        path: "/jmtj",
        name: "Jmtj",
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () =>
          import(/* webpackChunkName: "about" */ "../views/Jmtj.vue"),
      },
      {
        path: "/jmzc",
        name: "Jmzc",
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () =>
          import(/* webpackChunkName: "about" */ "../views/Jmzc.vue"),
      },
      {
        path: "/form",
        name: "Form",
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () =>
          import(/* webpackChunkName: "about" */ "../views/Form.vue"),
      },
      {
        path: "/findSearch",
        name: "FindSearch",
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () =>
          import(/* webpackChunkName: "about" */ "../views/Findsearch.vue"),
      },
      {
        path: "/serect",
        name: "Serect",
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () =>
          import(/* webpackChunkName: "about" */ "../views/Serect.vue"),
      },
      {
        path: "/suggest",
        name: "Suggest",
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () =>
          import(/* webpackChunkName: "about" */ "../views/Suggest.vue"),
      },
      {
        path: "/needWorker",
        name: "NeedWorker",
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () =>
          import(/* webpackChunkName: "about" */ "../views/NeedWorker.vue"),
      },
      {
        path: "/callMe",
        name: "CallMe",
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () =>
          import(/* webpackChunkName: "about" */ "../views/CallMe.vue"),
      },
    ],
  },
];

const router = new VueRouter({
  routes,
});

export default router;
